package dataImport.model;

import dataImport.model.abstracts.AbstractEntity;


public class DescriptionTemp extends AbstractEntity {

	private static final long serialVersionUID = 4823488465354396604L;

	private String stateId;

	private String text;

	private String relatedTo;

	private String relatedToId;

	public DescriptionTemp(final String id, final String text, final String relatedTo, final String relatedToId) {
		this(id, null, text, relatedTo, relatedToId);
	}

	public DescriptionTemp(final String id, final String stateId, final String text, final String relatedTo, final String relatedToId) {
		super(id);
		this.stateId = stateId;
		this.text = text;
		this.relatedTo = relatedTo;
		this.relatedToId = relatedToId;
	}

	public String getStateId() {
		return this.stateId;
	}

	public void setStateId(String stateId) {
		this.stateId = stateId;
	}

	public String getText() {
		return this.text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public String getRelatedTo() {
		return this.relatedTo;
	}

	public void setRelatedTo(String relatedTo) {
		this.relatedTo = relatedTo;
	}

	public String getRelatedToId() {
		return this.relatedToId;
	}

	public void setRelatedToId(String relatedToId) {
		this.relatedToId = relatedToId;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = super.hashCode();
		result = prime * result + ((this.relatedTo == null) ? 0 : this.relatedTo.hashCode());
		result = prime * result + ((this.relatedToId == null) ? 0 : this.relatedToId.hashCode());
		result = prime * result + ((this.stateId == null) ? 0 : this.stateId.hashCode());
		result = prime * result + ((this.text == null) ? 0 : this.text.hashCode());
		return result;
	}

	@Override
	public boolean equals(java.lang.Object obj) {
		if (this == obj) {
			return true;
		}
		if (!super.equals(obj)) {
			return false;
		}
		if (this.getClass() != obj.getClass()) {
			return false;
		}
		DescriptionTemp other = (DescriptionTemp) obj;
		if (this.relatedTo == null) {
			if (other.relatedTo != null) {
				return false;
			}
		}
		else if (!this.relatedTo.equals(other.relatedTo)) {
			return false;
		}
		if (this.relatedToId == null) {
			if (other.relatedToId != null) {
				return false;
			}
		}
		else if (!this.relatedToId.equals(other.relatedToId)) {
			return false;
		}
		if (this.stateId == null) {
			if (other.stateId != null) {
				return false;
			}
		}
		else if (!this.stateId.equals(other.stateId)) {
			return false;
		}
		if (this.text == null) {
			if (other.text != null) {
				return false;
			}
		}
		else if (!this.text.equals(other.text)) {
			return false;
		}
		return true;
	}
}
